package com.yuhanginfo.modules.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yuhanginfo.common.persistence.Page;
import com.yuhanginfo.common.service.WebCrudService;
import com.yuhanginfo.modules.web.dao.WebTransactionHistoryDao;
import com.yuhanginfo.modules.web.entity.WebTransactionHistory;

/**
 * 交易历史Service
 * @author lvls
 * @version 2017-09-21
 */
@Service
@Transactional(readOnly = true)
public class WebTransactionHistoryService extends WebCrudService<WebTransactionHistoryDao, WebTransactionHistory> {

	@Autowired
	private WebTransactionHistoryDao webTransactionHistoryDao;
	
	public WebTransactionHistory get(String id) {
		return super.get(id);
	}
	
	public List<WebTransactionHistory> findList(WebTransactionHistory transactionHistory) {
		return super.findList(transactionHistory);
	}
	
	public Page<WebTransactionHistory> findPage(Page<WebTransactionHistory> page, WebTransactionHistory transactionHistory) {
		return super.findPage(page, transactionHistory);
	}
	
	@Transactional(readOnly = false)
	public void save(WebTransactionHistory transactionHistory) {
		super.save(transactionHistory);
	}
	
	@Transactional(readOnly = false)
	public void delete(WebTransactionHistory transactionHistory) {
		super.delete(transactionHistory);
	}

	public List<WebTransactionHistory> selectByUserId(WebTransactionHistory entity) {
		return webTransactionHistoryDao.selectByUserId(entity);
	}

	public WebTransactionHistory selectDelByCode(String code) {
		return webTransactionHistoryDao.selectDelByCode(code);
	}
	
}